|
Walk forward optimization is a method used in finance for determining the best parameters to use in a trading strategy. The trading strategy is optimized with in sample data for a time window in a data series. The remainder of the data are reserved for out of sample testing. A small portion of the reserved data following the in sample data is tested with the results recorded. The in sample time window is shifted forward by the period covered by the out of sample test, and the process repeated. At the end, all of the recorded results are used to assess the trading strategy. It means to get the most suitable/stable parameters of the system and run the system with these parameters using another segment of data and these two segments of data do not overlap each other. It is the culmination of the following methods and helps in creation of robust systems. ''Backtesting'' is using past data to test a trading system. It's useful because, if a system was not profitable in the past, that's a strong sign it won't be profitable in the future. It refers to applying a trading system to historical data to verify how a system would have performed during the specified time period.〔( Investopedia: Backtesting And Forward Testing )〕 ''Forward testing'' is also known as ''Walk forward testing'' is the simulation of the real markets data on paper only. It means that though you are moving along the markets live, but you are not actually putting in real money, but doing virtual trading in lie markets to understand the movements of markets better. Hence, it is also called as the ''Paper Trading''. Forward performance testing is a simulation of actual trading and involves following the system's logic in a live market.〔 ==Overview== One of the biggest issues with system development is that many systems do not hold up into the future. There are several reasons for this. The first is that the system is not based on a valid premise. Another is that the testing is not sound for reasons such as: * Lack of robustness in a system due to improper parameters. A system is considered robust if it runs well in any market conditions. * Inconsistent rules and improper testing of the system using ‘out-of-sample’ and ‘in-sample’ data. ''Walk Forward Analysis'' does optimization on a training set; test on a period after the set and then rolls it all forward and repeats the process. We have multiple out-of-sample periods and look at these results combined. Walk forward analysis was originally discussed by Robert E. Pardo. Walking forward can keep a trading model a step ahead.〔(Walking forward can keep a trading model a step ahead )〕 Walk forward is so called, as we have multiple walk training and testing periods is less likely to suffer from overfitting. ''Walk forward testing allows us to develop a trading system while maintaining a reasonable ‘degree of freedom’''. Walk-forward testing carries the idea of ‘out-of-sample’ testing to the next level. Think of it as an ‘out-of-sample’ testing on steroids. It is a specific application of a technique known as Cross-validation. It means to take a segment of your data to optimize a system, and another segment of data to validate. Hence, here you optimize a window of data say past 1000 bars, and then test it on next 200 bars. Then roll the whole thing forward 200 bars and repeat the process. This gives you a large out of sample period and allows you to see how stable the system is over time. Suppose you consider a strategy around a moving average. You take the first 3 months of data, and find that for that period a 20-minute moving average was optimal (using tick data). You then validate this rule by assessing its performance for the 4th month (i.e. profit, reward/risk or any other statistic of interest). Next, you repeat the optimization using data from month 2-4, and validate using month 5, and keep repeating this until you've reached the end of the data. The performance you get for the validation months (4-13) are your out-of-sample performance. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Walk forward optimization」の詳細全文を読む スポンサード リンク
|